package model

import (
	"gorm.io/gorm"
	"time"
)

type Shop struct {
	Id        uint           `gorm:"column:id;type:bigint(20) UNSIGNED;primaryKey;not null;" json:"id"`
	Name      string         `gorm:"column:name;type:varchar(255);not null;" json:"name"`
	Intro     string         `gorm:"column:intro;type:varchar(255);not null;" json:"intro"`
	CreatedAt time.Time      `gorm:"column:created_at;type:datetime(3);comment:创建时间;not null;default:CURRENT_TIMESTAMP(3);" json:"created_at"` // 创建时间
	UpdatedAt time.Time      `gorm:"column:updated_at;type:datetime(3);comment:修改时间;not null;default:CURRENT_TIMESTAMP(3);" json:"updated_at"` // 修改时间
	DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:datetime;comment:删除时间;default:NULL;" json:"deleted_at"`                             // 删除时间
}

func (Shop) TableName() string {
	return "shop"
}
